//
// Created by baigui on 2021/10/23.
//

#ifndef SIMPLE_PLAYER_FILEDATASOURCE_H
#define SIMPLE_PLAYER_FILEDATASOURCE_H

#include "BaseStream.h"

class FileDatasource : public BaseStream{

public:
    FileDatasource(char *path);

    ~FileDatasource();

protected:

     ssize_t read(void *buf, size_t len) override;


     block_t *read_block(bool *eof) override;


     int seek(uint64_t) override;

     int  control(int i_query, va_list) override;

private:

    FILE *fp;
};


#endif //SIMPLE_PLAYER_FILEDATASOURCE_H
